﻿using LY.Entity;
using LY.Entity.Entities;
using LY.Entity.PageSearch;
using LY.Entity.SearchEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LY.Interface
{
   public  interface IInformationService
   {
       #region    查询列表
       /// <summary>
       /// 检索U_Information
       /// </summary>
       /// <param name="search"></param>
       /// <param name="view"></param>
       /// <returns></returns>
       PagedList<U_Information_EX> QueryInformationList(InformationSearch search, int? touser, PageView view);
       #endregion

       #region   插入信息
       /// <summary>
       /// 添加一条消息
       /// </summary>
       /// <param name="information"></param>
       /// <returns></returns>
       int AddInformation(U_Information information);
       #endregion

       #region   个人信息
       /// <summary>
       /// 个人接受信息
       /// </summary>
       /// <param name="touser"></param>
       /// <returns></returns>
       List<U_Information_EX> GetInformation(int? fromuser);
       #endregion

       #region   根据发送人查询信息列表
       List<U_Information> GetInformationByFromUser(int? fromuser);
       #endregion

       #region 消息记录数
       /// <summary>
       /// 根据fromuser，查询消息记录数
       /// </summary>
       /// <param name="fromuser"></param>
       /// <returns></returns>
       int GetInformationCount(int? touser);
       #endregion

       #region 更新消息状态
       /// <summary>
       /// 更新消息状态
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       int UpdateInformation(int? id);
       #endregion

       #region 根据编号查询消息列表
       /// <summary>
       /// 根据information 编号获得一个实体对象
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       U_Information_EX GetById(int? id);
       #endregion

       #region 根据id删除对象
       /// <summary>
       /// 删除
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       int Del(int? id);
       #endregion



   }
}
